﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" CodeBehind="List.aspx.cs" Inherits="Fatec.ControleEstoque.Interface.CustomPages.RelatorioNecessidades.List" %>

<%@ Register src="~/DynamicData/Content/GridViewPager.ascx" tagname="GridViewPager" tagprefix="asp" %>
<%@ Register src="~/DynamicData/Content/FilterUserControl.ascx" tagname="DynamicFilter" tagprefix="asp" %>
<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Web.UI.WebControls" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:DynamicDataManager ID="DynamicDataManager1" runat="server" AutoLoadForeignKeys="true" />

    <h2><%= table.DisplayName%></h2>

    <asp:ScriptManagerProxy runat="server" ID="ScriptManagerProxy1" />

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true"
                HeaderText="List of validation errors" />
        
            Período:&nbsp;<asp:TextBox ID="dataInicialTextBox" runat="server"></asp:TextBox>
            <ajx:MaskedEditExtender ID="dataInicialTextBox_MaskedEditExtender" 
                runat="server" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" 
                TargetControlID="dataInicialTextBox" Mask="99/99/9999" MaskType="Date">
            </ajx:MaskedEditExtender>
            <ajx:CalendarExtender ID="dataInicialTextBox_CalendarExtender" runat="server" 
                Enabled="True" TargetControlID="dataInicialTextBox">
            </ajx:CalendarExtender>
            <ajx:MaskedEditValidator ID="dataInicialTextBox_MaskedEditValidator" 
                runat="server" ControlToValidate="dataInicialTextBox" IsValidEmpty="False" 
                Text="*" ControlExtender="dataInicialTextBox_MaskedEditExtender" 
                Display="Dynamic" EmptyValueMessage="A data inicial deve ser preenchida" 
                InvalidValueMessage="Data inicial inválida" EmptyValueBlurredText="*" InvalidValueBlurredMessage="*"></ajx:MaskedEditValidator>
            &nbsp;até&nbsp;<asp:TextBox ID="dataFinalTextBox" runat="server"></asp:TextBox>
                        
            <ajx:MaskedEditExtender ID="dataFinalTextBox_MaskedEditExtender" runat="server" 
                CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" 
                MaskType="Date" TargetControlID="dataFinalTextBox" Mask="99/99/9999">
            </ajx:MaskedEditExtender>
            <ajx:CalendarExtender ID="dataFinalTextBox_CalendarExtender" runat="server" 
                Enabled="True" TargetControlID="dataFinalTextBox">
            </ajx:CalendarExtender>
            <ajx:MaskedEditValidator ID="dataFinalTextBox_MaskedEditValidator" 
                runat="server" ControlToValidate="dataFinalTextBox" IsValidEmpty="False" 
                Text="*" ControlExtender="dataFinalTextBox_MaskedEditExtender" 
                Display="Dynamic" EmptyValueMessage="A data final deve ser preenchida" 
                InvalidValueMessage="Data final inválida" EmptyValueBlurredText="*" 
                InvalidValueBlurredMessage="*"></ajx:MaskedEditValidator>
            <asp:CustomValidator ID="datasCustomValidator" runat="server"
                    ErrorMessage="Período de data inválido" 
                ControlToValidate="dataFinalTextBox" Display="Dynamic" 
                onservervalidate="datasCustomValidator_ServerValidate">*</asp:CustomValidator><asp:Button ID="pesquisarButton" runat="server" Text="Pesquisar" 
                onclick="pesquisarButton_Click" />
            <br />
            <br />
<asp:GridView ID="GridView1" runat="server"
                AllowPaging="True" AllowSorting="True" CssClass="gridview">

                <PagerStyle CssClass="footer"/>        
                <PagerTemplate>
                    <asp:GridViewPager runat="server" />
                </PagerTemplate>
                <EmptyDataTemplate>
                    There are currently no items in this table.
                </EmptyDataTemplate>
            </asp:GridView>


            <br />


            <br />

        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
